//
//  FMDBManager.m
//  YuanyangJinlou
//
//  Created by mac004 on 2017/1/10.
//  Copyright © 2017年 suli19910309@qq.com. All rights reserved.
//

#import "FMDBManager.h"

@implementation FMDBManager
+(FMDBManager *)standerDefault{
    static dispatch_once_t onceToken;
    static FMDBManager * manager=nil;
    dispatch_once(&onceToken, ^{
        manager =[[self alloc]init];
    });
    return manager;
}
-(id)init{
    self=[super init];
    if (self) {
        _db=[FMDatabase databaseWithPath:[self getFilePath]];
        
    }
    return self;
}
-(NSString*)getFilePath{
    NSString * filePath=[NSSearchPathForDirectoriesInDomains(NSDocumentationDirectory, NSUserDomainMask, YES)lastObject];
    return [filePath stringByAppendingPathComponent:@"data.db"];
}

@end
